package com.base.baseweb;

import java.util.Map;

public interface FetchPostProcessorFactory<C> {

    C resolve(Map<String, Object> config);

    FetchPostProcessor apply(C config);

    default String name(){
        String s = this.getClass().getSimpleName().replace(FetchPostProcessorFactory.class.getSimpleName(), "");
        int garbageIdx = s.indexOf("$Mockito");
        if (garbageIdx > 0) {
            return s.substring(0, garbageIdx);
        }
        return s;
    }
}
